In modern data processing systems there are two well established methods for the communication required between hardware and software for software control of hardware devices within the system: interrupts and polling. With interrupts, each hardware device signals that there is work for the software to do by asserting an interrupt line which causes the software flow-of-control to be diverted to an interrupt handler which handles the interrupt. An interrupt is typically handled by masking (or disabling) the interrupt and scheduling a task for later execution which will service the requesting device. Once the device has been serviced, the interrupt is unmasked (or enabled) again ready to allow the generation of further interrupts. With polling, the device driver continually checks the status of the device to determine whether it needs to be serviced. If so, the device is serviced.
With polling based systems, there is a trade-off between polling frequently so as to service the device with low latency and polling infrequently so as to keep the overhead of polling to a minimum. With interrupt-based systems, the device is serviced with low latency and low overhead when it is relatively idle but when the device becomes heavily utilised and is generating many interrupts the increased interrupt overhead can make the interrupt method inefficient. Generally speaking therefore, an interrupt based system is more efficient at relatively low device utilisation and a polling based system is more efficient at relatively high device utilisation. Neither technique is especially well adapted to the situation where the device presents varying amounts of work to the system.
Attempts have been made in the art to reduce the interrupt overhead in interrupt-based systems. In IBM Technical Disclosure Bulletin Vol 38 No 7 pp 497-500, a technique is described that is designed to reduce the number of interrupts generated by a LAN adapter. One type of interrupt (transmit complete) which does not impact response time is turned off thus reducing system disruption and CPU utilisation. An alternative method for identifying and reporting transmit completions is provided. Although the described technique goes some way to reducing interrupt overhead in the described environment, it necessitates the provision of an alternative method to handle the disabled interrupt.
It would be desirable to have a system having low latency at low workload levels and low overhead at high workload levels.